<?php
/**
 * Description of ContestWidget
 *
 * @author Alexey
 */
class ContestWidget extends CWidget {

    public function init()
    {
        parent::init();
    }

    public function run()
    {
        $model = ContestFacade::getActualRandomContest();
        if ($model == null)
        {
            return;
        }
        $count = ContestFacade::getContestImagesCount($model->id);
        $this->render('contestItemView', array('model' => $model, 'count' => $count));
    }
}
?>
